import App from './App'

import uView from '@/uni_modules/uview-ui'
// 全局 Mixin
import mixin from './common/mixin/mixin'
import {getDictData} from './common/js/dict.js'
// // 引入vconsole
// import VConsole from './common/js/vconsole.min.js';
// let vConsole = new VConsole()
// 全局 Util
import {date, debounce, getAuthToken, isLogin, model, msg, prePage, throttle, timestampToTime} from '@/common/js/util'
// 全局 Store
import store from './store'
import {DICT_TYPE, getDictDatas} from "@/common/js/dict";
// #ifndef VUE3
import Vue, {createSSRApp} from 'vue'

Vue.use(uView)

Vue.mixin(mixin)

Vue.prototype.$util = {
	msg,
	isLogin,
	debounce,
	throttle,
	prePage,
	date,
	model,
	timestampToTime,
	getDictData,
	getAuthToken
}

Vue.prototype.$store = store

Vue.prototype.getDictDatas = getDictDatas
Vue.prototype.DICT_TYPE = DICT_TYPE

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif
// #ifdef VUE3

export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif